package com.booktrade.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单详情表，存储订单中包含的每本书籍的信息
 * </p>
 */
@Getter
@Setter
@TableName("order_items")
public class OrderItems implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单详情ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单ID，关联到订单表
     */
    private Integer orderId;

    /**
     * 书籍ID，关联到书籍表
     */
    private Integer bookId;

    /**
     * 购买书籍数量
     */
    private Integer quantity;

    /**
     * 书籍单价
     */
    private BigDecimal price;
}
